package cn.tedu.review;
/*本类用于复习关键字this*/
public class TestThis {
    public static void main(String[] args) {
        Car c =new Car();
        c.run();
    }
}
class Car{
    int id;
    String brand;
    double price;

    public Car(){
        this (777);
        System.out.println("无参构造");
    }

    public Car(int n ){
        System.out.println("含参构造"+n);
    }

    public void run(){
        int id = 100;
        System.out.println(id);//100 就近原则，打印的是局部变量的值
        System.out.println(this.id);//0
    }
}